<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimal-ui">
    <meta name="author" content="">
    <title></title>  <link rel="icon" href="/template/pc1/images/wmh_favicon.ico" type="image/x-icon" />
    <% include("../inc/input_css.html"){}%>
    <style>
        label{
            width: 140px!important;
        }
    </style>
    <%
    var isAdd = false;
    var isEdit = false;
    if(isEmpty(memberRank.id)){
    isAdd = true;
    }else{
    isEdit = true;
    }%>
</head>
<body>
<div class="ibox">
    <div class="ibox-title">
        <div class="pull-left mbx navbar_title">
            <span class="current">品牌用户</span>
            <span class="line">/</span>
            <span class="current"><a href="list">会员级别</a></span><span class="line">/</span>
            <%if(isAdd){%>添加等级<%}else{%>编辑等级<%}%>
        </div>
    </div>
    <div class="ibox-content">
        <div class="wrapper wrapper-content">
            <div class="row">
                <div class="padding-40">
                    <form method="post"  action="<%if(isAdd){%>save<%}else{%>update<%}%>" class="form-horizontal form-validate">
                        <input type="hidden" name="memberRank.id" value="${memberRank.id!}" />
                        <div class="form-group">
                            <label class="col-sm-2 control-label"><span class="maroon">*</span>等级名称</label>
                            <div class="col-sm-3">
                                <input type="text" name="memberRank.name" value="${memberRank.name!}" class="form-control light-input" required="true">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">等级形式</label>
                            <div class="col-sm-3">
                                <select name="memberRank.type" class="form-control light-input" style="height: 31px">
                                    <option value="1" <%if(memberRank.type! == 1){print("selected");}%>>消费额</option>
                                    <option value="2" <%if(memberRank.type! == 2){print('selected');}%>>积分</option>
                                </select>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label"><span class="maroon">*</span>优惠百分比</label>
                            <div class="col-sm-3">
                                <input type="number" placeholder="请输入0-100的正整数" name="memberRank.preferentialScale" value="${memberRank.preferentialScale!}" class="form-control light-input" required="true">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label"><span class="maroon">*</span>所需积分</label>
                            <div class="col-sm-3">
                                <input type="number" placeholder="填写0或正整数字" name="memberRank.point" value="${memberRank.point!}" class="form-control light-input" required="true">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label"><span class="maroon">*</span>所需消费额</label>
                            <div class="col-sm-3">
                                <input type="number" placeholder="填写0或正整数字" name="memberRank.moneyNum" value="${memberRank.moneyNum!}" class="form-control light-input" required="true">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">是否默认</label>
                            <div class="col-sm-3">
                                <select name="memberRank.isDefault" value="${memberRank.isDefault!}" class="form-control light-input" style="height: 31px">
                                    <option value="0" <%if(isNotEmpty(memberRank)&&!(memberRank.isDefault)){print('selected');}%>>否</option>
                                    <option value="1" <%if(isNotEmpty(memberRank)&&memberRank.isDefault!){print('selected');}%>>是</option>
                                </select>
                            </div>
                            <span class="help-block"><span class="maroon"></span>若选择是,则会员刚注册或者扫码时默认该会员等级</span>
                        </div>
                        <div class="form-group" style="margin-top: 24px">
                            <label class="col-sm-2 control-label "></label>
                            <div class="col-sm-4 col-sm-offset-0">
                                <button class="hive-btn-cancle" id="btn_cancle" type="button" onclick="history.back()">&nbsp;取消&nbsp;</button>
                                <button class="hive-btn hive-btn-primary margin-left-8" type="submit">&nbsp;提交&nbsp;
                                </button>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>



<script src="https://static.9hive.cn/global/vendor/jquery/jquery-2.1.4.min.js"></script>
<script src="https://static.9hive.cn/global/vendor/nprogress/nprogress.js"></script>
<script src="https://static.9hive.cn/global/vendor/bootstrap-3.3.7/bootstrap.min.js"></script>
<script src="https://static.9hive.cn/global/vendor/jquery-validate/jquery.validate.min.js"></script>
<script src="https://static.9hive.cn/global/vendor/jquery-validate/additional-methods.min.js"></script>

<script src="https://static.9hive.cn/global/vendor/jquery-validate/localization/messages_zh.min.js"></script>
<script src="https://static.9hive.cn/global/vendor/jquery-ajaxform/ajax-form.js"></script>
<script src="https://static.9hive.cn/global/vendor/bootstrap-table-1.11/bootstrap-table.min.js"></script>
<script src="https://static.9hive.cn/global/vendor/bootstrap-table/extensions/mobile/bootstrap-table-mobile.min.js"></script>
<script src="https://static.9hive.cn/global/vendor/bootstrap-table-1.11/locale/bootstrap-table-zh-CN.min.js"></script>
<script src="https://static.9hive.cn/global/vendor/layer/layer.js"></script>
<!-- 自定义js -->
<script src="https://static.9hive.cn/global/vendor/inside/inside20170925.js"></script>
</body>
</html>